﻿using AppService.IService.System_Carrier_ment;
using Domain.Entity.Basic_information;
using Domain.IRepository.System_Carrier_ment;
using IdentityModel.Client;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.System_Carrier_ment
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Carrier_mentService:ICarrier_mentService
    {
        private readonly ICarrier_mentRepository carrier_MentRepository;

        public Carrier_mentService(ICarrier_mentRepository carrier_MentRepository)
        {
            this.carrier_MentRepository = carrier_MentRepository;
        }

        public bool Add(Carrier_ment carrier_Ment)
        {
            return carrier_MentRepository.Add(carrier_Ment)>0;
        }

        public List<Carrier_ment> Carrier_Ments_()
        {
            return carrier_MentRepository.Carrier_Ments_();
        }

        public int Count(string time, string Cr_cp_name)
        {
            return carrier_MentRepository.Count(time,Cr_cp_name);
        }

        public bool Delete(int Cr_id)
        {
            return carrier_MentRepository.Delete(Cr_id)>0;
        }

        public List<Carrier_ment> GetCarrier_Ments(int currentPage, int PageSize)
        {
            return carrier_MentRepository.GetCarrier_Ments(currentPage,PageSize);
        }

        public List<Carrier_ment> GetCarrier_Ments_time(string time, string Cr_cp_name, int currentPage, int PageSize)
        {
            return carrier_MentRepository.GetCarrier_Ments_time(time, Cr_cp_name, currentPage, PageSize);
        }

        public List<Carrier_ment> GetCarrier_Ments_Update(int Cr_id)
        {
            return carrier_MentRepository.GetCarrier_Ments_Update(Cr_id);
        }

        public bool Update(Carrier_ment carrier_ment)
        {
            return carrier_MentRepository.Update(carrier_ment)>0;
        }
    }
}
